package DataBase;
/*DataBase class for CS4311 Plug-in Project-"String Highlight"
 * @Author Accarp Tambe
 * Feb 02,2011
 */
import java.util.*;
import java.awt.Color;

public class DataBase {
    String searchString;
    Color userSelectHighlightColor;

	ArrayList<Color>  stringColorList = new ArrayList<Color>(3);
	
	DataBase(){
		Color greenColor = new Color(0 , 255, 0);
		Color blueColor = new Color(0 , 0, 255);
		Color redColor =  new Color(255, 0, 0);
		
		
	//store color objects into ArrayList
		stringColorList.add(0,greenColor);
		stringColorList.add(1, blueColor);
		stringColorList.add(2, redColor);
		
		
	}
	//function to call if user select Green in GUI
	public Color getGreenColor(){
		return (stringColorList.get(0));
	}
	
	//function to call if user select Blue in GUI
	public Color getBlueColor(){
		return (stringColorList.get(1));
	}
	
	//function to call if user select Red in GUI
	public Color getRedColor(){
		return (stringColorList.get(2));
	}
	
	public void setSearchString(String string){
		searchString = string;
	}
	
	public String getSearchString(){
		return searchString;
	}
	//call to return user selection back to database
	public void setUserSelectHighlightColor(Color _userSelectHighlightColor){
	
		userSelectHighlightColor = _userSelectHighlightColor;
	}

	public Color getUserSelectHighlightColor(){
		
		return userSelectHighlightColor;
	}

	public int getNumberOfElementInArrayList(){
		//returns number of elements ArrayList
		return(stringColorList.size());
	}
}

